"use strict"

/**
 * 南宁政府采购网爬虫
 *  
 */

var Base = require("./base");
var nn_spider = new Base();
nn_spider.name = "南宁采购网";
nn_spider.encode = "GBK";

nn_spider.getPageUrl = function(pg) {
    return "http://www.purchase.gov.cn//ccgxx/index_" + pg + ".htm";
};

nn_spider.getItems = function($) {
    var items = [];
    $(".c1-body a").each(function(index, ele) {
        var e = $(ele);
        var item = {};
        item.title = e.attr("title");
        item.url = e.attr("href");
        item.source = nn_spider.name;
        items.push(item);
    });
    return items;
};

exports = module.exports = nn_spider;